Use the right free() function. (#135511, George Bronnikov)
authorOwen Taylor <otaylor@redhat.com>
Thu, 26 Feb 2004 18:28:07 +0000 (18:28 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Thu, 26 Feb 2004 18:28:07 +0000 (18:28 +0000)
Thu Feb 26 13:23:47 2004  Owen Taylor  <otaylor@redhat.com>

        * gdk/x11/gdkwindow-x11.c (set_text_property): Use the right
        free() function. (#135511, George Bronnikov)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gdk/x11/gdkwindow-x11.c

index e32fe25c0380aa387ac34b3a9e6da3b42878bc95..a4d61f2dcf953536b792c1c525175314bcff74f0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Feb 26 13:23:47 2004  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/x11/gdkwindow-x11.c (set_text_property): Use the right
+       free() function. (#135511, George Bronnikov)
+
 2004-02-26  Federico Mena Quintero  <federico@ximian.com>
 
        * configure.in: Added a comment to inform translators that they
index e32fe25c0380aa387ac34b3a9e6da3b42878bc95..a4d61f2dcf953536b792c1c525175314bcff74f0 100644 (file)
@@ -1,3 +1,8 @@
+Thu Feb 26 13:23:47 2004  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/x11/gdkwindow-x11.c (set_text_property): Use the right
+       free() function. (#135511, George Bronnikov)
+
 2004-02-26  Federico Mena Quintero  <federico@ximian.com>
 
        * configure.in: Added a comment to inform translators that they
index e32fe25c0380aa387ac34b3a9e6da3b42878bc95..a4d61f2dcf953536b792c1c525175314bcff74f0 100644 (file)
@@ -1,3 +1,8 @@
+Thu Feb 26 13:23:47 2004  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/x11/gdkwindow-x11.c (set_text_property): Use the right
+       free() function. (#135511, George Bronnikov)
+
 2004-02-26  Federico Mena Quintero  <federico@ximian.com>
 
        * configure.in: Added a comment to inform translators that they
index e32fe25c0380aa387ac34b3a9e6da3b42878bc95..a4d61f2dcf953536b792c1c525175314bcff74f0 100644 (file)
@@ -1,3 +1,8 @@
+Thu Feb 26 13:23:47 2004  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/x11/gdkwindow-x11.c (set_text_property): Use the right
+       free() function. (#135511, George Bronnikov)
+
 2004-02-26  Federico Mena Quintero  <federico@ximian.com>
 
        * configure.in: Added a comment to inform translators that they
index e32fe25c0380aa387ac34b3a9e6da3b42878bc95..a4d61f2dcf953536b792c1c525175314bcff74f0 100644 (file)
@@ -1,3 +1,8 @@
+Thu Feb 26 13:23:47 2004  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/x11/gdkwindow-x11.c (set_text_property): Use the right
+       free() function. (#135511, George Bronnikov)
+
 2004-02-26  Federico Mena Quintero  <federico@ximian.com>
 
        * configure.in: Added a comment to inform translators that they
index c4f8575aff5243c0d4d04f8f1e9386e7fe6947ed..93bb3df6ccca7eaf9d948c0a95013348376fd88a 100644 (file)
@@ -2214,6 +2214,7 @@ set_text_property (GdkDisplay  *display,
   Atom prop_type;
   gint prop_length;
   gint prop_format;
+  gboolean is_compound_text;
   
   if (utf8_is_latin1 (utf8_str))
     {
@@ -2221,6 +2222,7 @@ set_text_property (GdkDisplay  *display,
       prop_text = gdk_utf8_to_string_target (utf8_str);
       prop_length = prop_text ? strlen (prop_text) : 0;
       prop_format = 8;
+      is_compound_text = FALSE;
     }
   else
     {
@@ -2230,6 +2232,7 @@ set_text_property (GdkDisplay  *display,
                                             utf8_str, &gdk_type, &prop_format,
                                             &prop_text, &prop_length);
       prop_type = gdk_x11_atom_to_xatom_for_display (display, gdk_type);
+      is_compound_text = TRUE;
     }
 
   if (prop_text)
@@ -2241,7 +2244,10 @@ set_text_property (GdkDisplay  *display,
                       PropModeReplace, prop_text,
                       prop_length);
 
-      gdk_free_compound_text (prop_text);
+      if (is_compound_text)
+       gdk_free_compound_text (prop_text);
+      else
+       g_free (prop_text);
     }
 }